capture log close
clear all
set maxvar 10000
set more off
pause off
# delimit;

local crime "";
local output "";

/* 
Figure B4
*/

use "`crime'\prep2\crime_prwora_prepforreg.dta", clear ;

local bwidth = 264 ;

hist dobwk_run if dobdd_run >= -`bwidth' &  dobdd_run <= `bwidth' & keep_1997_2017_any == 1, 
	discrete freq
	title("Histogram of birthdates", size(medsmall))
	xtitle("Birthdate (weeks relative to cutoff)", size(medsmall)) 
	ytitle("Number of SSI children", size(medsmall))
	ylab(200 "200" 400 "400", angle(horizontal))
	lcolor(black) fcolor(gray)
	graphregion(color(white))
	bgcolor(white)
	ylab(,nogrid)
	;
graph save 		"`output'\\figB4.gph", replace;
graph export 	"`output'\\figB4.png", replace;

capture log close;
